
function getList(){
	var p=getQ()
	var data=JSON.parse(p.data)
	document.getElementById("name").textContent=data.class_name+"班实验作业"
	document.getElementById("teacher").textContent="老师："+data.teacher_chinesename
	document.getElementById("class_number").textContent="班级编号："+data.class_number
	jQuery.ajax({
		"url":"/get_student_exp/",
		"error":errorAjax,
		"beforeSend":start_load_pic,
		"complete":stop_load_pic,
		"data":{"id":p.id},
		"dataType":"jsonp",
		"success":function(data){
			if(!data.status){
				showErrorInfo(data.content);
				return false;
			}
			else{
				data=data.content
				var tab=document.getElementById("tab");
				for(var i=0;i<data.length;i++){
					var tr=document.createElement("tr")
					var td=document.createElement("td")
					td.textContent=data[i].content;
					tr.appendChild(td)
					
					var td=document.createElement("td")
					td.textContent=data[i].publish_date;
					tr.appendChild(td)
					

					var td=document.createElement("td")
					td.textContent=data[i].status;
					tr.appendChild(td)
					
					var td=document.createElement("td")
					td.textContent=data[i].complete_date;
					tr.appendChild(td)
					
					var td=document.createElement("td")
					var button=document.createElement("a")
					button.className="btn btn-xs btn-success"
					button.textContent="开始作业"
					button.setAttribute("href","student_index.html?page=work.html&data="+JSON.stringify(data[i]))

					td.appendChild(button)
				
					var button=document.createElement("a")
					button.className="btn btn-xs btn-info"
					button.textContent="查看老师评价"
					button.style.marginLeft="5px"
					button.setAttribute("description",data[i].description)
					button.onclick=function(){
						var description=this.getAttribute("description")
						$("#w").show()
						$("#description").val(description)
						startShadow()
					}
					td.appendChild(button)
					
				
					tr.appendChild(td)
					

					tab.appendChild(tr)

				}
			}
		}
	})
}
document.getElementById("cw").onclick=function(){
	$("#w").hide("fast")
	stopShadow()
}
getList()

